declare global {
    interface System {
      import (request: string): Promise<any>
    }
    var System: System
}
import login from '../views/login.vue'
import home from '../views/home/home.vue'
import main from '../views/main.vue'
export const locking = {
    path: '/locking',
    name: 'locking',
    component: () => import('../components/lockscreen/components/locking-page.vue')
};
export const otherRouters={
    path:'/main',
    name:'main',
    permission:'',
    meta:{title:'ManageMenu'},
    component:main,
    children:[
        //{path: 'home', meta:{title:'HomePage'}, name: 'home', component:()=>import('../views/home/home.vue')}
    ]
}
export const appRouters=[
    {path:'/', redirect:'/home', name: 'index-main', children:[]},
    {path: '/home', meta:{title:'首页'}, name: 'home', component:()=>import('../views/home/home.vue'), children: []},
    {path: '/index', meta:{title:'首页'}, name: 'index', component:()=>import('../views/index.vue'), children:[
        {path: 'login', meta:{title:'登陆'}, name: 'login', component:()=>import('../views/index/login.vue')},
        {path: 'retrievepassword', meta:{title:'找回密码'}, name: 'retrieve-password', component:()=>import('../views/index/retrieve-password.vue')},
        {path: 'register', meta:{title:'注册'}, name: 'register', component:()=>import('../views/index/register.vue')},
        {path: 'useragreement', meta:{title:'会员注册协议'}, name: 'user-agreement', component:()=>import('../views/index/user-agreement.vue')},
        {path: 'contactus', meta:{title:'联系我们'}, name: 'contact-us', component:()=>import('../views/index/contact-us.vue')},
        {path: 'about/:tag', meta:{title:'关于我们'}, name: 'about', component:()=>import('../views/index/about.vue')},
        {path: 'articlelist/:systemtype', meta:{title:'文章列表'}, name: 'article-list', component:()=>import('../views/index/article-list.vue')},
        {path: 'articledetail/:systemtype/:id', meta:{title:'文章详情'}, name: 'article-detail', component:()=>import('../views/index/article-detail.vue')},
        {path: 'mall', meta:{title:'商城'}, name: 'mall', component:()=>import('../views/index/mall.vue')},
        {path: 'commoditydetail/:id', meta:{title:'商品详情'}, name: 'commodity-detail', component:()=>import('../views/index/commodity-detail.vue')},
        {path: 'shoppingcart', meta:{title:'我的购物车'}, name: 'shopping-cart', component:()=>import('../views/index/shopping-cart.vue')},
        {path: 'submitorder', meta:{title:'提交订单'}, name: 'submit-order', component:()=>import('../views/index/submit-order.vue')},
        {path: 'payment/:ordernumber', meta:{title:'付款'}, name: 'payment', component:()=>import('../views/index/payment.vue')},
        {path: 'feedback', meta:{title:'意见反馈'}, name: 'feedback', component:()=>import('../views/index/feedback.vue')},
        {path: 'friendlylink', meta:{title:'友情链接'}, name: 'friendly-link', component:()=>import('../views/index/friendly-link.vue')},
        {path: 'searchresult', meta:{title:'搜索结果'}, name: 'search-result', component:()=>import('../views/index/search-result.vue')},
        {path: 'couponcenter', meta:{title:'领券中心'}, name: 'coupon-center', component:()=>import('../views/index/coupon-center.vue')},
 
    ]},
    {path: '/member', meta:{title:'会员中心'}, name: 'member', component:()=>import('../views/member.vue'), children: [ 
        {path: 'index', redirect: { name: 'member-order' }, meta:{title:'会员中心'}, name: 'member-index', component:()=>import('../views/member/index.vue')},
        {path: 'myorder', meta:{title:'我的订单'}, name: 'member-order', component:()=>import('../views/member/order/myorder.vue')},
        {path: 'refund', meta:{title:'我的退款'}, name: 'member-refund', component:()=>import('../views/member/refund.vue')},
        {path: 'myxp', meta:{title:'我的积分'}, name: 'member-xp', component:()=>import('../views/member/myxp.vue')},
        {path: 'orderdetail/:ordernumber', meta:{title:'订单详情'}, name: 'member-order-detail', component:()=>import('../views/member/order/order-detail.vue')},
        {path: 'address', meta:{title:'收货地址'}, name: 'member-address', component:()=>import('../views/member/address/address.vue')},
        {path: 'collection', meta:{title:'我的收藏'}, name: 'member-collection', component:()=>import('../views/member/collection.vue')},
        {path: 'commodityevaluation', meta:{title:'商品评价'}, name: 'member-commodity-evaluation', component:()=>import('../views/member/commodity-evaluation.vue')},
        {path: 'articlecomment', meta:{title:'文章评论'}, name: 'member-article-comment', component:()=>import('../views/member/article-comment.vue')},
        {path: 'personalprofile', meta:{title:'个人资料'}, name: 'member-profile', component:()=>import('../views/member/personal-profile.vue')},
        {path: 'changepassword', meta:{title:'修改密码'}, name: 'member-change-password', component:()=>import('../views/member/change-password.vue')},
        {path: 'membernotice', meta:{title:'会员公告'}, name: 'member-notice', component:()=>import('../views/member/member-notice.vue')},
        {path: 'membercoupon', meta:{title:'我的优惠券'}, name: 'member-coupon', component:()=>import('../views/member/coupon.vue')},
    ]},
]
export const routers = [
    locking,
    ...appRouters,
    otherRouters
];
